import axios from "@/vendor/axios";
import Qs from "qs";

//登录
export function login(data) {
  return axios({
    method: 'post',
    url: '/api/user/login',
    data: data
  })
}

//检查登录是否过期
export function isLogin(data) {
  return axios({
    method: 'post',
    url: '/api/base/isLogin',
    data: data
  })
}


//注册
export function register(data) {
  return axios({
    method: 'post',
    url: '/api/user/register',
    data: data
  })
}

//获取验证码
export function getcode(data) {
  return axios({
    method: 'post',
    url: '/api/sms/sendSms',
    data: data
  })
}
//获取用户信息
export function agentInfo(data) {
  return axios({
    method: 'post',
    url: '/api/Agent/agentInfo',
    data: data
  })
}

//找回密码
export function forget(data) {
  return axios({
    method: 'post',
    url: '/api/user/forget',
    data: data
  })
}



//获取个人资料(地址)
export function personalData(data) {
  return axios({
    method: 'post',
    url: '/api/agent/personalData',
    data: data
  })
}

//公告
export function noticeList(data) {
  return axios({
    method: 'post',
    url: '/api/News/noticeList',
    data: data
  })
}

//公告详情
export function noticeInfo(data) {
  return axios({
    method: 'post',
    url: '/api/News/noticeInfo',
    data: data
  })
}



//保存个人资料
export function personalUpdate(data) {
  return axios({
    method: 'post',
    url: '/api/agent/personalUpdate',
    data: data
  })
}

//团队

export function agentList(data) {
  return axios({
    method: 'post',
    url: '/api/agent/agentList',
    data: data
  })
}

//会员

export function directlyList(data) {
  return axios({
    method: 'post',
    url: '/api/agent/directlyList',
    data: data
  })
}

//会员信息

export function agentRankList(data) {
  return axios({
    method: 'post',
    url: '/api/agent/agentRankList',
    data: data
  })
}

//银行卡信息
export function bankInfoDisplay(data) {
  return axios({
    method: 'post',
    url: '/api/agent/bankInfoDisplay',
    data: data
  })
}

// 获取银行卡列表
export function bankCardList() {
  return axios({
    method: 'post',
    url: '/api/Bankcard/getBankcardList',
  })
}

//获取银行卡类型
export function bankList() {
  return axios({
    method: 'get',
    url: '/api/Bankcard/BankList',
  })
}

//添加银行卡、修改
export function addBankcard(data) {
  return axios({
    method: 'post',
    url: '/api/Bankcard/addBankcard',
    data:data
  })
}
//银行卡软删除
export function delBankcard(data) {
  return axios({
    method: 'post',
    url: '/api/Bankcard/delBankcard',
    data:data
  })
}
export function getBankcardInfo(data) {
  return axios({
    method: 'get',
    url: '/api/Bankcard/getBankcardInfo?id='+data.id,
    data:data
  })
}
//绑定银行卡
export function bindBankCard(data) {
  return axios({
    method: 'post',
    url: '/api/agent/bindBankCard',
    data: data
  })
}
//qq群列表
export function getQQgroups() {
  return axios({
    method: 'get',
    url: '/api/Agent/getQQgroups',
  })
}

//我的钱包
export function wallets(data) {
  return axios({
    method: 'post',
    url: '/api/agent/wallet',
    data: data
  })
}

export function wallet(data) {
  return axios({
    method: 'post',
    url: '/api/Finance/getUserMoneyDetail',
    data: data
  })
}

export function myInvite(data) {
  return axios({
    method: 'post',
    url: '/api/Agent/myInviteUserList',
    data: data
  })
}



//获取充值账号
export function chargeAccount() {
  return axios({
    method: 'get',
    url: '/api/Finance/getRechargeAccount',
  })
}

//添加充值记录
export function addUserAssetCharge(data) {
  return axios({
    method: 'post',
    url: '/api/Finance/addUserAssetCharge',
    data: data
  })
}

//上传图片

export function fileUploadOne(data) {
  return axios({
    method: 'post',
    url: '/api/File/fileUploadOne',
    data: data,
  })
}

export function uploadOss(data) {
  return axios({
    method: 'post',
    url: '/api/File/uploadOss',
    data: data,
  })
}

//发布任务
export function publishTask(data) {
  return axios({
    method: 'post',
    url: '/api/task/publishTask',
    data: data,
  })
}

//上传任务
export function taskUpload(data) {
  return axios({
    method: 'post',
    url: '/api/task/taskUpload',
    data: data,
  })
}

//上传完成任务凭证
export function uploadTaskQueueVoucher(data) {
  return axios({
    method: 'post',
    url: '/api/Task/uploadTaskQueueVoucher',
    data: data,
  })
}



//更改头像

export function topimgUpdate(data) {
  return axios({
    method: 'post',
    url: '/api/agent/topimgUpdate',
    data: data,
  })
}

//发布任务

export function generateCode(data) {
  return axios({
    method: 'get',
    url: '/api/agent/generateCode',
    data: data,

  })
}

//任务种类列表


export function taskRand(data) {
  return axios({
    method: 'post',
    // 还没写
    // url: '/api/Task/',
    data: data,
  })
}

//已结任务列表
export function submitTaskList(data) {
  return axios({
    method: 'post',
    url: '/api/task/submitTaskList',
    data: data,

  })
}

export function getMyReceiveTask(data) {
  return axios({
    method: 'post',
    url: '/api/Task/getMyReceiveTask',
    data: data,

  })
}



//任务列表
export function tasklist(data) {
  return axios({
    method: 'post',
    url: '/api/task/getTaskList',
    data: data,

  })
}

//任务详情

export function taskInfo(data) {
  return axios({
    method: 'post',
    url: '/api/task/getTaskInfo',
    data: data,

  })
}

//领取任务
export function taskReceive(data) {
  return axios({
    method: 'post',
    url: 'api/Task/receiveTask',
    data: data,
  })
}
//任务明细详情
export function getMyReceiveTaskQueueInfo(data) {
  return axios({
    method: 'post',
    url: 'api/Task/getMyReceiveTaskQueueInfo',
    data: data,
  })
}

//用户信息
export function getUserInfo() {
  return axios({
    method: 'post',
    url: 'api/Personalcenter/getUserInfo',
  })
}

//绑定支付宝
export function bindingAlipay(data) {
  return axios({
    method: 'post',
    url: 'api/Personalcenter/bindingAlipay',
    data: data,
  })
}

export function bindingWeChat(data) {
  return axios({
    method: 'post',
    url: 'api/Personalcenter/bindingWeChat',
    data: data,
  })
}

export function addUserWithdraw(data) {
  return axios({
    method: 'post',
    url: 'api/Finance/addUserWithdraw',
    data: data,
  })
}

export function unreadMessagesCount() {
  return axios({
    method: 'post',
    url: 'api/Messages/unreadMessagesCount',
  })
}

export function getMessageList(data) {
  return axios({
    method: 'post',
    url: 'api/Messages/getMessageList',
    data: data,
  })
}

export function getMessageInfo(data) {
  return axios({
    method: 'post',
    url: 'api/Messages/getMessageInfo',
    data: data,
  })
}
//任务排队
export function setTaskQueue() {
  return axios({
    method: 'post',
    url: 'api/Task/setTaskQueue',
  })
}
//取消排队
export function delTaskQueue() {
  return axios({
    method: 'post',
    url: 'api/Task/delTaskQueue',
  })
}
//提现详情
export function getUserWithdrawInfo(data) {
  return axios({
    method: 'post',
    url: 'api/Finance/getUserWithdrawInfo',
    data: data,
  })
}
















